// Job.cpp: implementation of the CJob class.
//Author : Pradeep K Sahu
//Email : sahupk@yahoo.com
//Note   : You are free to use the code, and modify. Provided you
//         don't remove this comments. It will be great if you can provide
//		   your feedback.
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "JobQ.h"
#include "Job.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
long CJob::lastUsedID=0;


CJob::CJob()
{
	this->m_ID = InterlockedIncrement(&lastUsedID);
	this->m_autoDeleteFlag = TRUE;
	this->m_priority = 5;
	this->m_Completed= FALSE;
}


CJob::~CJob()
{

}




BOOL CJob::AutoDelete()
{
	return m_autoDeleteFlag;
}

void CJob::setAutoDelete(BOOL autoDeleteFlag)
{
	m_autoDeleteFlag = autoDeleteFlag;
}

long CJob::getID()
{
	return this->m_ID;
}

int CJob::getPriority()
{
	return this->m_priority;	
	
}


void CJob::setPriority(int priority)
{
	this->m_priority = priority;
}
